<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  <%@ page language="java" import="com.num2.model.lhr.allSelModel"%>
  <%@ page language="java" import="com.num2.form.lhr.NextPage"%>
  <base href="<%=basePath%>">
		<title>无标题页</title>
		<link rel="stylesheet" type="text/css" href="<%=basePath%>css/index.css">
		<script type="text/javascript" src="<%=basePath%>js/jquery-1.10.2.js"></script>
		<script language="javascript" type="text/javascript">
		
		function click1(num){
		
		if(document.getElementById(num).style.display=="block")
		{
		 document.getElementById(num).style.display="none";
		}
		else
		{
		 document.getElementById(num).style.display="block";	
		}
		
		}
		
		function froze(user_num){
		$.ajax({	
		url:"demo/openAccout/closeAccCon",
		data:{usernum:user_num},
		//这是请求成功后回调的函数
		success:function(data){
			alert(data);
			history.go(0);
		}
		});
		}
		
		function condition(){
		var query=document.getElementById("conditionQuery").value;
		var current=1;
		var table=document.getElementById("conditionTable");
		$.ajax({	
		url:"demo/openAccout/condition",
		data:{query:query,currentPage:current},
		//这是请求成功后回调的函数
		success:function(data){
		table.innerHTML="1";
		}
		});
		
		}
		    </script>
		</head>
		<body class="mian_bj">
		<div class="mian_top_01">
		<div class="mian_top_r"></div>
		<div class="mian_top_l"></div>
		<div class="mian_top_c">
		<ul>
		<li><a href="openAccout/enableSelectCon?currentPage=1">
		<p>
		启用账户</p>
		</a></li>
		<li><a href="openAccout/frozeSelectCon?currentPage=1">
		<p>
		冻结账户</p>
		</a></li>
		<!-- <li><a href="demo/openAccount.jsp">
		<p>
		开户</p>
		</a></li> -->
		 
		</ul>
		</div>
		<div class="mian_b">
		<div class="mian_b1">
		<p class="mian_b1_sousuo">
		<input name="" type="text" id="conditionQuery"></p>
		<a onclick= "condition()" style=" cursor:pointer; text-align:center;" title="搜索">
		<p class="mian_b1_a3">
		</p>
		</a>
		<%NextPage np =(NextPage) request.getAttribute("enableResult"); %>
		<a href="<%=basePath%>openAccout/enableSelectCon?currentPage=<%=np.getTotalPage()%>" title="最后">
		<p class="mian_b1_a4">
		</p>
		</a>
		<% if(np.getCurrentPage()+1>=np.getTotalPage()){
		%>
		<a href="<%=basePath%>openAccout/enableSelectCon?currentPage=<%=np.getTotalPage()%>" title="下一页">
		<p class="mian_b1_a5">
		</p>
		</a>
		<%}else{ %>
		<a href="<%=basePath%>openAccout/enableSelectCon?currentPage=<%=np.getCurrentPage()+1%>" title="下一页">
		<p class="mian_b1_a5">
		</p>
		</a>
		<% }%>
		<p class="mian_b1_list">
		共<%=np.getTotalPage()%>页/当前第<%=np.getCurrentPage()%>页</p>
		<% if(np.getCurrentPage()-1<=1){
		%>
		<a href="<%=basePath%>openAccout/enableSelectCon?currentPage=1" title="上一页">
		<p class="mian_b1_a6">
		</p>
		<%}else{ %>
		<a href="<%=basePath%>openAccout/enableSelectCon?currentPage=<%=np.getCurrentPage()-1%>" title="上一页">
		<p class="mian_b1_a6">
		</p>
		<%} %>
		</a><a href="<%=basePath%>openAccout/enableSelectCon?currentPage=1" title="最前">
		<p class="mian_b1_a7">
		</p>
		</a>
		</div>
		<table width="100%" border="0" cellpadding="0" cellspacing="0" class="mian_b_bg" id="conditionTable">
		<tr id="search" style="display: none;">
		<td colspan="8" style="height: 35px; background-color: #DBDBDB;margin-left:20px">
		</td>
		<td colspan="3" style="height: 35px; background-color: #DBDBDB;">
		</td>
		</tr>
		<tr>
		<td width="3%" class="mian_b_bg_lm">
		<input name="" type="checkbox" value="">&nbsp;
		</td>
		<td width="10%" class="mian_b_bg_lm">
		<span></span>序号
		</td>
		<td width="10%" class="mian_b_bg_lm">
		<span></span>账户户号
		</td>
		<td width="5%" class="mian_b_bg_lm">
		<span></span>姓名
		</td>
		<td width="10%" class="mian_b_bg_lm">
		<span></span>详细地址
		</td>
		<td width="10%" class="mian_b_bg_lm">
		<span></span>电话
		</td>
		<td width="10%" class="mian_b_bg_lm">
		<span></span>身份证号
		</td>
		<td width="10%" class="mian_b_bg_lm">
		<span></span>账户余额
		</td>
		<td width="10%" class="mian_b_bg_lm">
		<span></span>状态
		</td>
		<td colspan="2" class="mian_b_bg_lm">
		<span></span>操作
		</td>
		</tr>
		<%
			
			List<allSelModel> result=np.getResPage();
			if(result!=null){		    
				for(int i=0;i<result.size();i++){
				 allSelModel results=result.get(i); 
				 String Jurisdiction=null;
				 if(results.getStatement()==0){
					Jurisdiction="启用";
					}else{
					Jurisdiction="冻结";
					} 
		%>
		<tr>
		<td>
		<input name="" type="checkbox" value="">&nbsp;
		</td>
		<td>
		<%=i%>
		</td>
		<td>
		<%=results.getUser_num()%> 
		</td>
		<td>
		<%=results.getName()%> 
		</td>
		<td>
	    <%=results.getAddress()%>
		</td>
		<td>
	    <%=results.getTelephone()%>
		</td>
		<td>
		<%=results.getId_card()%>
		</td>
		<td>
		<%=results.getBalance() %>
		</td>
		<td>
		 <%=Jurisdiction %>
		</td>
		<td width="5%" class="mian_b_icon_01">
		<a onclick="froze(<%=results.getUser_num()%>)" style=" cursor:pointer; text-align:center;" >冻结</a>
		</td>
		<!-- <td width="5%" class="mian_b_icon_02">
		<a href="EmployeeDetail.html">查看</a>
		</td> -->
		</tr>
		<% 
		}
		}
		%>
		
		<tr>
		<td width="3%" class="mian_b_bg_lm">&nbsp;
		
		</td>
		<td width="10%" class="mian_b_bg_lm">
		<span></span>工号
		</td>
		<td width="5%" class="mian_b_bg_lm">
		<span></span>员工名称
		</td>
		<td width="10%" class="mian_b_bg_lm">
		<span></span>性别
		</td>
		<td width="10%" class="mian_b_bg_lm">
		<span></span>员工职位
		</td>
		<td width="10%" class="mian_b_bg_lm">
		<span></span>手机
		</td>
		<td width="10%" class="mian_b_bg_lm">
		<span></span>所属部门
		</td>
		<td width="10%" class="mian_b_bg_lm">
		<span></span>入职时间
		</td>
		<td width="10%" class="mian_b_bg_lm">
		<span></span>状态
		</td>
		<td colspan="2" class="mian_b_bg_lm">
		<span></span>操作
		</td>
		</tr>
		</table>
		</div>
		</div>
		</body>
		</html>
<!-- 		<script src="/common.js"></script> -->
